#include <cstdio>
#include <algorithm>
using namespace std;
int main(void){
    int m;
    scanf("%d",&m);
    while(m--){
        int n;
        scanf("%d",&n);
        double ans=1;
        int flag=-1;
        for(int i=2;i<=n;i++){
            ans=ans+flag*1.0/i;
            flag*=-1;
        }
        printf("%.2lf\n",ans);
    }
    return 0;
}
